﻿using Autofac;
using Catastrophe.Emgucv.UI;
using Catastrophe.Initialize;
using Catastrophe.Initialize.IOCProvier;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using Wpf.Ui;

namespace Catastrophe.Emgucv.SystemIni
{
    /// <summary>
    /// 容器初始化
    /// </summary>
    public class IOCIni : IContainerIni, IRunManager
    {
        public bool IsRun { get; set; } = true;

        public void ContainerLoad(ContainerBuilder container)
        {
            container.RegisterType<ucEmgucv>().As<UserControl>().Named<UserControl>(nameof(ucEmgucv)).InstancePerDependency();
            container.RegisterType<ucEmgucvCamera>().As<UserControl>().Named<UserControl>(nameof(ucEmgucvCamera)).InstancePerDependency();
            container.RegisterType<SnackbarService>().As<ISnackbarService>().InstancePerDependency();
        }
    }
}
